<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Cat_id')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="col-xs-4">
                    <select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                        <option value="0">选择分类</option>
                        {foreach name="category" item="vo"}
                        {if $vo.level == 1}
                            <option value="{$vo.id}" {in name="vo.id" value="$row.category.categoryLevel"}selected{/in}>{$vo.name}</option>
                        {/if}
                        {/foreach}
                    </select>
                </div>
                <div class="col-xs-4">
                    <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[cat_pid]">
                        <option value="0" data-type="0">选择分类</option>
                        {foreach name="category" item="vo"}
                        {if $vo.level == 2}
                            <option data-type="{$vo.parent_id}" {in name="vo.id" value="$row.category.categoryLevel"}selected{/in} value="{$vo.id}">{$vo.name}</option>
                        {/if}
                        {/foreach}
                    </select>
                </div>
                <div class="col-xs-4">
                    <select id="c-cpid" data-rule="required" class="form-control selectpicker" name="row[cat_id]">
                        <option value="0" data-type="0">选择分类</option>
                        {foreach name="category" item="vo"}
                        {if $vo.level == 3}
                            <option data-type="{$vo.parent_id}" value="{$vo.id}" {in name="vo.id" value="$row.cat_id"}selected{/in}>{$vo.name}</option>
                        {/if}
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_sn')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_sn" data-rule="required" class="form-control" name="row[goods_sn]" type="text" value="{$row.goods_sn}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_name" data-rule="required" class="form-control" name="row[goods_name]" type="text" value="{$row.goods_name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_name_en')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_name_en" class="form-control" name="row[goods_name_en]" type="text" value="{$row.goods_name_en}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hsnumber')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hsnumber" data-rule="required" class="form-control" name="row[hsnumber]" type="number" value="{$row.hsnumber}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Property')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-property" data-rule="required" class="form-control" name="row[property]" type="text" value="{$row.property}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Gproduction')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-gproduction" data-rule="required" class="form-control" name="row[gproduction]" type="text" value="{$row.gproduction}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Brand')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand" data-rule="required" class="form-control" name="row[brand]" type="text" value="{$row.brand}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit" data-rule="required" class="form-control" name="row[unit]" type="text" value="{$row.unit}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Store_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-store_count" data-rule="required" class="form-control" name="row[store_count]" type="number" value="{$row.store_count}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weight" data-rule="required" class="form-control" name="row[weight]" type="number" value="{$row.weight}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Market_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-market_price" data-rule="required" class="form-control" step="0.01" name="row[market_price]" type="number" value="{$row.market_price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_price" data-rule="required" class="form-control" step="0.01" name="row[shop_price]" type="number" value="{$row.shop_price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Member_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-member_price" data-rule="required" class="form-control" step="0.01" name="row[member_price]" type="number" value="{$row.member_price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cost_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cost_price" class="form-control" step="0.01" name="row[cost_price]" type="number" value="{$row.cost_price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-keywords" data-rule="required" class="form-control" name="row[keywords]" type="text" value="{$row.keywords}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_remark" data-rule="required" class="form-control" name="row[goods_remark]" type="text" value="{$row.goods_remark}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-goods_content" class="form-control editor" rows="5" name="row[goods_content]" cols="50">{$row.goods_content}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Original_img')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-original_img" data-rule="required" class="form-control" name="row[original_img]" type="text" value="{$row.original_img}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-original_img" class="btn btn-danger plupload" data-input-id="c-original_img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-maxsize="2M" data-preview-id="p-original_img"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-original_img" class="btn btn-primary fachoose" data-input-id="c-original_img" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-original_img"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-original_img"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">产品图片:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[avatar]" type="text" value="{$row.avatar}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-maxsize="2M" data-preview-id="p-avatar"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('On_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-on_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[on_time]" type="text" value="{$row.on_time|datetime}">
        </div>
    </div>
    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('Last_update')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-last_update" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[last_update]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Commission')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-commission" class="form-control" step="0.01" name="row[commission]" type="number" value="{$row.commission}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Spu')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-spu" class="form-control" name="row[spu]" type="text" value="{$row.spu}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sku')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sku" class="form-control" name="row[sku]" type="text" value="{$row.sku}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
